#!/bin/bash
path="https://gitee.com/scientificworld/touhou_mac_integration/raw/master/tool/unrar"
file="rarosx.tar.gz"
dir="rar"
cd "$(dirname "$0")"
mkdir -p tmp
cd tmp
curl -o "$file" "$(curl -s "$path/link.txt")"
tar -zxvf "$file"
mv "$dir/unrar" ..
cd ..
rm -r tmp
